package geektime.jdk.date;

import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 * 消失的10天
 */
public class DisappearTenDays {

    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(1582, 9, 4);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
        System.out.println("如果当前的时间是：" + sdf.format(calendar.getTime()));
        calendar.add(Calendar.DAY_OF_MONTH, 1);
        System.out.println("过了一天后时间是：" + sdf.format(calendar.getTime()));
    }
}
